//中序线索化
void binTree::makeMthread(binTreeNode *p) {
    if(!p) return;
    makeMthread(p->l_child);
    if(p->l_child == nullptr){
        p->l_child = pre;
        p->is_l_child = false;
    }
    if(pre->r_child == nullptr){
        pre->r_child = p;
        pre->is_r_child = false;
    }
    pre=p;
    makeMthread(p->r_child);
}
//线索二叉树的遍历
void binTree::visitMthread() {
    binTreeNode* p = root;
    while(p != nullptr)
    {
        while(p->is_l_child == true)
            p = p->l_child;
        cout<<p->data<<" ";
        while(p->is_r_child == false && p->r_child != nullptr){
            p=p->r_child;
            cout<<p->data<<" ";
        }
        p=p->r_child;
    }

}